﻿using MailKit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RecordBill.Dtos
{
    public class EmailMessage
    {
        public UniqueId Uid { get; set; }
        public string Subject { get; set; }
        public string From { get; set; }
        public DateTime Date { get; set; }
        public List<string> DownloadLinks { get; set; }
        public string Body { get; set; }

        public void PrintInfo()
        {
            Console.WriteLine($"主题: {Subject}");
            Console.WriteLine($"发件人: {From}");
            Console.WriteLine($"时间: {Date:yyyy-MM-dd HH:mm:ss}");
            Console.WriteLine("下载链接:");

            foreach (var link in DownloadLinks)
            {
                Console.WriteLine($"  - {link}");
            }
            Console.WriteLine(new string('-', 50));
        }
    }
}
